package com.shanjupay.user.controller;

import com.shanjupay.user.api.SmsService;
import com.xuecheng.common.domain.response.RestResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


@Api(value = "短信通知相关", tags = "短信验证码发送校验")
@RestController
@RequestMapping("/sms")
@Slf4j
public class SmsController {

    @Resource
    private SmsService smsService;


    @ApiOperation("发送短信验证码")
    @ApiImplicitParam(name = "phone", value = "手机号", required = true, dataType = "String", paramType = "query")
    @GetMapping("/sendMessage")
    public RestResponse sendMessage(@RequestParam String phone){
        return null;
    }


    @ApiOperation("校验短信验证码")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "phone", value = "手机号", required = true, dataType = "String", paramType = "query"),
            @ApiImplicitParam(name = "verifyCode", value = "验证码", required = true, dataType = "String", paramType = "query")
    } )
    @GetMapping("/verify")
    public RestResponse sendMessage(String phone, String verifyCode){
        return null;
    }


}
